The params part is checked only once. Keep it at the top of the file.
For not conflicting with dub's internal parameters, it uses the syntax #PARAMETER
"params": {
"windows": {
//Defines windows specific parameters
},
"linux": {
//Defines linux specific parameters
},
"SOME_GLOBAL_VAR": "This parameter can be used anywhere here by simply using #SOME_GLOBAL_VAR"
}
A dub.template.json can have a parent dub.json(or dub.template.json), this is used for separating some
configurations, such as the release one, since things can get hairy quite fast if not done.
"$extends": "#HIPREME_ENGINE/dub.json"
## Adding the engine optional modules
This can be done by using engineModules property. They will automatically
use the absolute path and be added to the linkedDependencies on the current section. It is checked on
both root and configurations.
Another important feature of it is that the engine distributed modules requires a special distribution of hipengine_api.
This distribution is hipengine_api:direct. This module optimizes the function calls to instead of using function pointers,
it uses extern definitions, this way, it can be built as a static library.
This way, it is checked inside the "release" configuration, for making every of them use the subConfiguration of
"direct".
"engineModules": [
"util",
"game2d",
"math"
]
Those in linkedDependencies will automatically be added a linker flag called
/WHOLEARCHIVE:depName for windows on ldc compiler.
Since this is an error prone operation, it may be handled by the templater.
Also checked in configurations.
Those in unnamed dependencies will automatically be added to the "dependencies" section.
If the path does not exists, it will be ignored and simply do nothing. Also checked in configurations.
dub.template.json reference:
The params part is checked only once. Keep it at the top of the file. For not conflicting with dub's internal parameters, it uses the syntax #PARAMETER
A dub.template.json can have a parent dub.json(or dub.template.json), this is used for separating some configurations, such as the release one, since things can get hairy quite fast if not done.
## Adding the engine optional modules This can be done by using engineModules property. They will automatically use the absolute path and be added to the linkedDependencies on the current section. It is checked on both root and configurations.
Another important feature of it is that the engine distributed modules requires a special distribution of hipengine_api. This distribution is hipengine_api:direct. This module optimizes the function calls to instead of using function pointers, it uses extern definitions, this way, it can be built as a static library. This way, it is checked inside the "release" configuration, for making every of them use the subConfiguration of "direct".
Those in linkedDependencies will automatically be added a linker flag called /WHOLEARCHIVE:depName for windows on ldc compiler. Since this is an error prone operation, it may be handled by the templater. Also checked in configurations.
Those in unnamed dependencies will automatically be added to the "dependencies" section. If the path does not exists, it will be ignored and simply do nothing. Also checked in configurations.